package com.woniuxy.common.controller;

import com.woniuxy.common.entity.User;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description：
 * @Author：曹杰克
 * @CreateTime：2022/10/19 18:35
 */
@RestController
public class Login{

    @PostMapping("/login")
    public User login(@RequestBody User user){
        System.out.println("登陆");
        if(user.getUsername().equals("tom")){

            return user;
        }else {
            User user1 = new User();
            user1.setUsername("lilei");
            return user1;
        }

    }
}
